import useAxiosApi from '/@/utils/useAxiosApi';


/**
 * 账号密码登录
 * @returns UseAxiosReturn
 */
export function loginPassword() {
  return useAxiosApi(`/api/login`, {
    method: 'POST',
    data: { name: '123' },
  });
}


/**
 * 获取物联网实时数据
 * @returns UseAxiosReturn
 */
export function getIotData() {
  return useAxiosApi(`http://150.158.11.142:5000/voltage?id=12`, {
    method: 'GET',
  });
}
//向终端发送控制命令
export function sendCommand(params){
  return useAxiosApi(`http://150.158.11.142:5000/relay`, {
    method: 'POST',
    data: params,
  });
}
